<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
    <style>
        .el-page-header__content {
            color: white;
            font-weight: bold;
        }
    </style>
</head>
<body>
<div id="app">
    <el-page-header style="background-color: springgreen;
            color: white;line-height: 60px" @back="goBack" content="案例详情">
    </el-page-header>
    <el-card style="width: 700px;margin: 0 auto">

        <scan>案例名称:{{cases.name}}</scan>
        <scan>风格:{{cases.style}}</scan>
        <scan>户型:{{cases.type}}</scan>
        <scan>面积:{{cases.area}}</scan>

        <p>封面</p>
        <img :src="cases.cover" width="50%">
        <p>客厅</p>
        <img :src="cases.parlourUrl" width="50%">
        <p>卧室</p>
        <img :src="cases.bedroomUrl" width="50%">
        <p>餐厅</p>
        <img :src="cases.restaurantUrl" width="50%">
        <p>卫生间</p>
        <img :src="cases.toiletUrl" width="50%">
        <p>厨房</p>
        <img :src="cases.kitchenUrl" width="50%">

        </el-form>
    </el-card>


</div>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
    let v = new Vue({
        el: '#app',
        data: function () {
            return {
                cases: {}

            }
        },
        methods: {
            goBack() {
                history.back();//返回上一页面
            }
        },
        created: function () {
            //发请求通过id获取案例详情
            axios.get("/csae/selectByIdAdmin" + location.search)
                .then(function (response) {
                    v.cases = response.data;
                })
        }
    })
</script>
</html>